1. Field of the Invention
The present invention relates to an image processing method of filling a specific closed area in an image with particular color dots or figures and an image processing apparatus therefor.
2. Background and Related Art
In the prior art, where a closed image region is filled, the closed image region is displayed on a screen of an image processing apparatus and an operator indicates one point in the closed image region to be filled with a pointing device. The image processing apparatus completes fill processing by detecting the closed area including the point in a memory which stores image data, and converting the detected image data inside of the closed area into the same image data. In such fill processing, since the operator must indicate a closed image region to be filled, the fill processing has a disadvantage that the indication operation becomes complicated when a plurality of closed areas are overlapped.
Lately, some image processing methods of automatically filling a specific closed image region based on a predetermined condition have been proposed. Among these methods, a method is well known in which an operator indicates a contour forming a closed area to be filled by one stroke (see FIG. 18). Forming a contour with one stroke refers to forming a contour with a single continuous line starting at "start point" and ending at that same point. This image processing method is known as Winding Rule Fill method and has an advantage that a contour is easily inputted. In Winding Rule Fill method, a closed image region is filled in the following image processing procedure.
In FIG. 18, a halfline A is formed from an arbitrary point O, e.g., a center position in a closed image region (region enclosed by linking points A, B, C and D) to a particular direction, in a memory in an image processing apparatus. Next, a progress direction of a contour drawn by one stroke crossing the halfline A, is analyzed by the image processing apparatus. On a basis of a result of the analysis, the number of clockwise intersecting contours and the number of counterclockwise intersecting contours are counted. When the total number of clockwise intersecting contours is just equal to the total number of counterclockwise intersecting contours, it is judged that the closed region (region enclosed by linking points A, B, C, D) including the point O is to be filled and inside of this region is filled on the memory in the image processing apparatus.
Thus, it is judged whether other closed image regions are to be filled or not by the image processing apparatus, and a region in closed regions, which matches the filling condition given by an operator, is filled.
An image processing apparatus has the following disadvantage when the image processing apparatus performs fill processing by the above Winding Rule Fill method:
(1) Since fill processing is composed of many kinds of processing including the processing for determining a center position used for judging of filling, the processing for calculating an intersection of a contour and a halfline, a process for checking a direction of the contour including the intersection and the like, fill processing takes a long time.
(2) An image processing apparatus requires a large capacity memory for storing image data and processing-related data so as to perform the above many kinds of processing.
Based on the above points, it is an object of the present invention to provide an image processing method and an image processing apparatus in which fill processing can be performed at a high speed and memory capacity used for fill processing can be minimized.